import request from '@/utils/request'

/**
 * 获取退料记录
 */
export function list() {
  return request({
    url: '/production/exit/list',
    method: 'get'
  })
}

/**
 * 获取工单列表
 */
export function getExitInfo() {
  return request({
    url: '/production/order/list',
    method: 'get'
  })
}

/**
 * 获取领料列表
 * @param {string} productionNo 
 * @returns 
 */
export function getExitList(productionNo) {
  return request({
    url: '/production/exit/checkout',
    method: 'get',
    params: {
      productionNo
    }
  })
}

/**
 * 退料
 * @param {object} data 
 * @returns 
 */
export function returnMaterial(data) {
  return request({
    url: '/production/exit/return',
    method: 'post',
    data: data
  })
}